# 设定头文件搜索路径
include_directories(
        ${PROJECT_SOURCE_DIR}/include
)

# 添加子目录，每个子目录代表一个子模块
# 添加 spdlog 子目录
add_subdirectory(libs/spdlog)
add_subdirectory(include/properties)
add_subdirectory(include/paths)
add_subdirectory(include/logs)
add_subdirectory(include/utils)

# 定义 Circle 库的源文件
set(CIRCLE_SOURCES
        Circle.cpp
)

# 如果有其他子模块，可以继续添加，例如：
# add_subdirectory(include/AnotherModule)

add_library(Circle STATIC ${CIRCLE_SOURCES})
# 链接子库到 Circle 库
target_link_libraries(Circle PRIVATE
        spdlog::spdlog
        Properties
        Paths
        Logs
        CircleUtilsString
)

# 设置 Circle 库的公共头文件路径
target_include_directories(Circle PUBLIC
        ${PROJECT_SOURCE_DIR}/include
)

# 链接子库到 Circle 库
target_link_libraries(Circle PRIVATE
        Properties
        Paths
        CircleUtilsString
)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules/Circle/libs/static)

